{% extends "base.html" %}

{% block content %}
{% import "m_mailview.html" as mview %}

<form method="post" action="{{ phpself }}">
	<p><strong>Note</strong>: These settings only apply to the current session. If you want to permanently change
		a setting, change it in the configuration file (config/config.ini)</p>

	<fieldset id="settings">
		<legend>Settings</legend>
		{{ mview.input('name', 'Your name', config.name,
			'Your name, used when sending mail') }}

		{{ mview.input('mail', 'Your mail address', config.mail,
			'Your email address, used when sending mail') }}

		{{ mview.input('timezone', 'Timezone', config.timezone,
			'Used to sanitize recieved dates') }}

		{{ mview.input('allfolders', 'List all folders', config.allfolders,
			'List all folders in the menu instead of just the subscribed ones', 'checkbox') }}

		{{ mview.input('autoexpunge', 'Automatically expunge', config.autoexpunge,
			'Automatically expunge mailbox on delete/move', 'checkbox') }}

		{{ mview.input('headers', 'Headers', config.headers,
			'Comma-separated Headers you want displayed when viewing an email') }}

		{{ mview.input('background', 'Folders to check in the background', config.background,
		'Comma-separated list of mailboxes to check when checking for new email in the background') }}

		{{ mview.input('sort', 'Sorting order', config.sort,
			'Email sorting order') }}

		{{ mview.input('markasread', 'Mark as read', config.markasread,
			'When should we mark an email as read? (i.e. set /Seen flag)') }}

		{{ mview.input('dateformat', 'Date format', config.dateformat,
			'Date formatting option, see http://nl.php.net/manual/en/function.date.php' ) }}

		{{ mview.input('briefdateformat', 'Brief Date format', config.briefdateformat,
			'Date formatting option, see http://nl.php.net/manual/en/function.date.php' ) }}
	</fieldset>

	<p>
		<input type="submit" value="Save" />
	</p>
</form>

{% endblock %}

{% block afterjs %}
<script>
  AddEvent(window, 'load', LoginFormHelp);
</script>

{% endblock %}
